<?php
require ('include/connect.php');
require ('include/db_sql.php');
require ('include/functions.php');
$lur = islogin();
$loginin = $lur['username'];
$rnd = $lur['rnd'];
$link = db_connect();
$dblink = new mysqlquery();
$chars = ReturnDbCharList('');
// 数据库列表
if (isset($_GET['mydbname'])) {
	$mydbname = $_GET['mydbname'];
} else {
    $mydbname = '';
}
$selectdbname = $db_dbname;
if ($mydbname) {
    $selectdbname = $mydbname;
}
$db = '';
if ($canlistdb) {
    $db .= "<option value='" . $selectdbname . "' selected>" . $selectdbname . "</option>";
} else {
    $sql = $dblink->query("SHOW DATABASES");
    while (! ! $r = $dblink->fetch($sql)) {
        if ($r[0] == $selectdbname) {
            $select = " selected";
        } else {
            $select = "";
        }
        $db .= "<option value='" . $r[0] . "'" . $select . ">" . $r[0] . "</option>";
    }
}
require LoadAdminTemp('do_sql.php');
db_close();
$dblink = null;